import request from '@/utils/request'

export function getBusinessList(query: any) {
    return request({
        url: '/tienchin/business/list',
        method: 'get',
        params: query
    })
}
export function addBusiness(data: any) {
    return request({
        url: '/tienchin/business',
        method: 'post',
        data
    })
}
export function fromTemplate(query: any) {
    return request({
        url: `/tienchin/business/activity/${query.channelId}`,
        method: 'get',
        params: query
    })
}
export function channelslist(query: any) {
    return request({
        url: `/tienchin/business/channels`,
        method: 'get',
        query    
    })
}
export function updateBusiness(data: any) {
    return request({
        url: `/tienchin/business`,
        method: 'put',
        data
    })
}
export function deleteBusiness(query: any) {
    return request({
        url: `/tienchin/business/${query.businessIds}`,
        method: 'delete',
        params: query
    })
}
export function assignment(data: any){
    return request({
        url: `tienchin/assignment`,
        method: 'post',
        data
    })
}
export function businessxq(query: any){
    return request({
        url: `/tienchin/business/${query.id}`,
        method: 'get',
        params: query
    })
}
export function joblist(query: any){
    return request({
        url: `/system/dict/data/type/business_occupation`,
        method: 'get',
        params: query
    })
}
export function xueli(query: any){
    return request({
        url: `/system/dict/data/type/business_education`,
        method: 'get',
        params: query
    })
}
export function subjectlist(params: any) {
    return request({
        url: '/system/dict/data/type/course_type',
        method: 'get',
        params // 使用 params 传递查询参数
    })

}
export function courselist(params: any) {
    return request({
        url: '/tienchin/business/all_course',
        method: 'get',
        params // 使用 params 传递查询参数
    })
    }
export function courseDetail(params: any) {
    return request({
        url: `/tienchin/course/${params.courseId}`,
        method: 'get',
        params // 使用 params 传递查询参数
    })
}
export function statuserror(params: any) {
    return request({
        url: `/system/dict/data/type/business_status`,
        method: 'get',
        params // 使用 params 传递查询参数
    })
  
}
export function jiaoliu(params: any) {
    return request({
        url: `/system/dict/data/type/business_focus`,
        method: 'get',
        params // 使用 params 传递查询参数
        })
}
